// 全局样式变量
$primary-color: #409eff;
$success-color: #67c23a;
$warning-color: #e6a23c;
$danger-color: #f56c6c;
$info-color: #909399;

$text-primary: #2c3e50;
$text-regular: #606266;
$text-secondary: #909399;
$text-placeholder: #c0c4cc;

$border-color: #dcdfe6;
$border-light: #e4e7ed;
$border-lighter: #ebeef5;

$bg-color: #f5f7fa;
$bg-white: #ffffff;

// 全局样式重置
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: $text-primary;
  background-color: $bg-color;
}

// 通用工具类
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }
.p-5 { padding: 40px; }

// 响应式工具类
.hidden-xs {
  @media (max-width: 767px) {
    display: none !important;
  }
}

.hidden-sm {
  @media (min-width: 768px) and (max-width: 991px) {
    display: none !important;
  }
}

.hidden-md {
  @media (min-width: 992px) and (max-width: 1199px) {
    display: none !important;
  }
}

.hidden-lg {
  @media (min-width: 1200px) {
    display: none !important;
  }
}

// 动画类
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter, .fade-leave-to {
  opacity: 0;
}

.slide-up-enter-active, .slide-up-leave-active {
  transition: transform 0.3s ease;
}

.slide-up-enter, .slide-up-leave-to {
  transform: translateY(20px);
}

// 按钮样式增强
.el-button {
  border-radius: 4px;
  font-weight: 500;
  
  &--primary {
    background: linear-gradient(135deg, #409eff 0%, #337ecc 100%);
    border: none;
    
    &:hover {
      background: linear-gradient(135deg, #66b1ff 0%, #409eff 100%);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4);
    }
  }
}

// 卡片样式增强
.el-card {
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  border: none;
  
  &:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    transition: all 0.3s ease;
  }
}

// 输入框样式增强
.el-input {
  .el-input__inner {
    border-radius: 4px;
    
    &:focus {
      border-color: $primary-color;
      box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
    }
  }
}

// 表格样式增强
.el-table {
  border-radius: 8px;
  overflow: hidden;
  
  th {
    background-color: #fafafa;
    color: $text-primary;
    font-weight: 600;
  }
}

// 分页样式增强
.el-pagination {
  text-align: center;
  margin-top: 20px;
  
  .el-pager li {
    border-radius: 4px;
    
    &.active {
      background-color: $primary-color;
      color: white;
    }
  }
}

// 加载状态
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  
  .loading-text {
    margin-left: 10px;
    color: $text-secondary;
  }
}

// 空状态
.empty-container {
  text-align: center;
  padding: 60px 20px;
  color: $text-secondary;
  
  .empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: $border-color;
  }
  
  .empty-text {
    font-size: 16px;
    margin-bottom: 20px;
  }
  
  .empty-action {
    margin-top: 20px;
  }
}

// 响应式容器
.container-fluid {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
  
  @media (min-width: 576px) {
    max-width: 540px;
  }
  
  @media (min-width: 768px) {
    max-width: 720px;
  }
  
  @media (min-width: 992px) {
    max-width: 960px;
  }
  
  @media (min-width: 1200px) {
    max-width: 1140px;
  }
  
  @media (min-width: 1400px) {
    max-width: 1320px;
  }
}

// 网格系统
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col {
  flex: 1 0 0%;
  padding-right: 15px;
  padding-left: 15px;
}

@for $i from 1 through 12 {
  .col-#{$i} {
    flex: 0 0 (100% / 12 * $i);
    max-width: (100% / 12 * $i);
    padding-right: 15px;
    padding-left: 15px;
  }
}

// 响应式列
@media (max-width: 767px) {
  @for $i from 1 through 12 {
    .col-xs-#{$i} {
      flex: 0 0 (100% / 12 * $i);
      max-width: (100% / 12 * $i);
    }
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  @for $i from 1 through 12 {
    .col-sm-#{$i} {
      flex: 0 0 (100% / 12 * $i);
      max-width: (100% / 12 * $i);
    }
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  @for $i from 1 through 12 {
    .col-md-#{$i} {
      flex: 0 0 (100% / 12 * $i);
      max-width: (100% / 12 * $i);
    }
  }
}

@media (min-width: 1200px) {
  @for $i from 1 through 12 {
    .col-lg-#{$i} {
      flex: 0 0 (100% / 12 * $i);
      max-width: (100% / 12 * $i);
    }
  }
}

